To best illustrate the benefits of structuring a project we will start with a simple example; a project that contains 3 files and no project folders. In this example, the project was created with the Directory property of the project set to /dev, into which the following files were added:-
ò /dev/a
ò /dev/src/b
ò /include/c
When adding files to a project, whether to the root or project folder, Programmer Studio attempts to store the files as relative whenever possible. In this example files added to the project which include /dev (project Directory) as the start of their location have this removed.
|
Location |
Resolves To |
|
/dev |
|
|
a |
/dev/a |
|
src/b |
/dev/src/b |
|
/include/c |
/include/c |
By storing the names of the project files as relative, Programmer Studio allows the user to change the location of the files. As long as the structure is moved intact, the project will only require the Directory property of the project to be changed.
Note |
The Resolved Location field in the project settings dialog displays how Programmer Studio will interpret relative file and directory names. |
In order to reflect the structure of the existing file system, a new folder source is added to the project. The Directory property of the new folder is set to src and the file /dev/src/b is then moved into the new folder as b. Using the name resolution rules, the location of b is now determined by traversing the tree and building a path, for example:
|
Location |
Resolves To |
|
/dev |
|
|
src |
|
|
b |
/dev/src/b |
These examples are intentionally simple and do not show the server profile which would be included in any real path name to a file. However the examples do illustrate how settings are inherited within the hierarchy of a project.
See Also